{extend name="layout:base" /}

{block name="body"}

{include file="common:nav" /}

<div class="container bg-fff mt-20 br-5">
    <div class="row">
        <div class="col-lg-12">

            <h3 class="mb-20">修改密码</h3>

            <form action="{:url('index/postChangePassword')}" method="post">
                {:token()}
                <div class="row mb-20">
                    <label class="col-lg-3 text-right">原密码</label>
                    <div class="col-lg-5">
                        <input type="password" name="old_password" class="form-control" placeholder="请输入原密码"
                               data-rule="required(请输入内容)">
                    </div>
                </div>

                <div class="row mb-20">
                    <label class="col-lg-3 text-right">新密码</label>
                    <div class="col-lg-5">
                        <input type="password" name="new_password" class="form-control" placeholder="请输入新密码"
                               data-rule="required(请输入内容)|length(5,16)">
                    </div>
                </div>

                <div class="row mb-20">
                    <label class="col-lg-3 text-right">新密码</label>
                    <div class="col-lg-5">
                        <input type="password" name="new_password_confirmation" class="form-control" placeholder="请再输入一次"
                               data-rule="required(请输入内容)|equal([name='new_password'])">
                    </div>
                </div>

                <div class="row">
                    <div class="col-lg-5 col-lg-offset-3 mb-20">
                        <button type="submit" class="btn btn-default">
                            <i class="fa fa-check-circle" aria-hidden="true"></i> 确定
                        </button>
                    </div>
                </div>

            </form>

        </div>
    </div>
</div>

{include file="common:footer" /}

{/block}

{block name="footer"}
<script>
    require(['smvalidator'], function (smvalidator) {
        smvalidator.setSkin('bootstrap');
        new smvalidator('form', {
            submit: function(valid, form) {
                if(valid) form.submit();
            }
        });
    });
</script>
{/block}